// 2013-8-1下午06:06:55  net.betou.trade.main.manager.TradeMng.java

package net.betou.trade.main.manager;

import net.betou.common.page.Pagination;
import net.betou.trade.entity.main.AgentAndAdmins;
import net.betou.trade.entity.main.Trade;
import net.betou.trade.entity.main.User;

/**
 * 
 * @author 叶装装
 */
public interface TradeMng{
	
	//public Trade updateOpen( AgentAndAdmins admin, )
	
	public Trade saveOpen( AgentAndAdmins admin, String categoryName, Trade bean, String orientedGroup, String smsGroup );

	public Trade saveClose( Trade bean );
	
	public Trade updateClose( Trade bean );
	
	/**
	 * 查找自己的Trade
	 * 
	 * @param userid
	 * @param adminId
	 * @return
	 */
	public Trade findMyTrade( Integer userid, Integer adminId, Boolean system );

	/**
	 * 更新
	 * @return
	 */
	public Trade updateOpen( String categoryName, Trade bean, String orientedGroup, String smsGroup );

	/**
	 * 根据ID查找
	 * 
	 * @param id
	 *            ID
	 * @return
	 */
	public Trade findById( Integer id );


	/**
	 * 批量删除
	 * 
	 * @param ids
	 *            传递的ID数组
	 * @return
	 */
	public Trade [ ] deleteByIds( Integer [ ] ids );
	

	/**
	 * 删除
	 * 
	 * @param id
	 * @return
	 */
	public Trade deleteById( Integer id );

	/**
	 * 
	 * @return
	 */
	public Pagination getOpenTradePage( AgentAndAdmins admin, String searchProperty, String searchValue, String orderProperty, String orderDirection, int pageNo, int pageSize, String filterStatus );
	
	public Pagination getCloseTradePage( AgentAndAdmins admin, String searchProperty, String searchValue, String orderProperty, String orderDirection, int pageNo, int pageSize, String filterStatus );
	
	
	public Pagination getPage( Boolean status,  User user, int pageNo, int pageSize );

}
